using Microsoft.AspNetCore.Http;
using System.ComponentModel.DataAnnotations;

namespace VotingSystem.ViewModels
{
    public class VoteOptionCreateViewModel
    {
        [Required(ErrorMessage = "请输入选项标题")]
        [StringLength(200, ErrorMessage = "标题长度不能超过200个字符")]
        [Display(Name = "标题")]
        public string Title { get; set; } = string.Empty;

        [StringLength(500, ErrorMessage = "描述长度不能超过500个字符")]
        [Display(Name = "描述")]
        public string? Description { get; set; }

        [Display(Name = "图片")]
        public IFormFile? Image { get; set; }

        [Display(Name = "图片URL")]
        public string? ImageUrl { get; set; }

        [Display(Name = "评分范围")]
        [Range(1, 10, ErrorMessage = "评分范围必须在1-10之间")]
        public int? MaxRating { get; set; }

        [Display(Name = "评分说明")]
        public string? RatingDescription { get; set; }
    }
} 